.class public Lcom/instagram/f/b/c;
.super Ljava/lang/Object;
.source "IgBitmapCache.java"


# static fields
.field static final a:Landroid/graphics/BitmapFactory$Options;

.field private static b:Lcom/instagram/f/b/c;


# instance fields
.field private c:Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;

.field private final d:Landroid/content/Context;

.field private e:Lcom/instagram/f/b/b;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/instagram/f/b/b",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private f:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Lcom/instagram/f/b/g;",
            ">;"
        }
    .end annotation
.end field

.field private g:Ljava/util/HashSet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashSet",
            "<",
            "Lcom/instagram/f/b/g;",
            ">;"
        }
    .end annotation
.end field

.field private h:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList",
            "<",
            "Lcom/instagram/f/b/g;",
            ">;"
        }
    .end annotation
.end field

.field private i:Lcom/instagram/f/a/a;

.field private j:Lcom/instagram/f/b/h;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 60
    new-instance v0, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v0}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    sput-object v0, Lcom/instagram/f/b/c;->a:Landroid/graphics/BitmapFactory$Options;

    .line 65
    sget-object v0, Lcom/instagram/f/b/c;->a:Landroid/graphics/BitmapFactory$Options;

    const/4 v1, 0x1

    iput-boolean v1, v0, Landroid/graphics/BitmapFactory$Options;->inPurgeable:Z

    .line 66
    sget-object v0, Lcom/instagram/f/b/c;->a:Landroid/graphics/BitmapFactory$Options;

    const/4 v1, 0x0

    iput-boolean v1, v0, Landroid/graphics/BitmapFactory$Options;->inInputShareable:Z

    .line 69
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 4
    .parameter

    .prologue
    .line 79
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 55
    new-instance v0, Lcom/instagram/f/b/b;

    const/high16 v1, 0x1e0

    const/16 v2, 0x15e

    const/16 v3, 0x3c

    invoke-direct {v0, v1, v2, v3}, Lcom/instagram/f/b/b;-><init>(III)V

    iput-object v0, p0, Lcom/instagram/f/b/c;->e:Lcom/instagram/f/b/b;

    .line 57
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/instagram/f/b/c;->f:Ljava/util/HashMap;

    .line 58
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/instagram/f/b/c;->g:Ljava/util/HashSet;

    .line 59
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/instagram/f/b/c;->h:Ljava/util/LinkedList;

    .line 80
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/f/b/c;->d:Landroid/content/Context;

    .line 81
    return-void
.end method

.method static synthetic a(Lcom/instagram/f/b/c;)Lcom/instagram/f/a/a;
    .locals 1
    .parameter

    .prologue
    .line 43
    invoke-direct {p0}, Lcom/instagram/f/b/c;->f()Lcom/instagram/f/a/a;

    move-result-object v0

    return-object v0
.end method

.method public static a()Lcom/instagram/f/b/c;
    .locals 1

    .prologue
    .line 72
    sget-object v0, Lcom/instagram/f/b/c;->b:Lcom/instagram/f/b/c;

    return-object v0
.end method

.method public static a(Landroid/content/Context;)V
    .locals 1
    .parameter

    .prologue
    .line 76
    new-instance v0, Lcom/instagram/f/b/c;

    invoke-direct {v0, p0}, Lcom/instagram/f/b/c;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/instagram/f/b/c;->b:Lcom/instagram/f/b/c;

    .line 77
    return-void
.end method

.method private a(Lch/boye/httpclientandroidlib/client/methods/HttpGet;)V
    .locals 1
    .parameter

    .prologue
    .line 439
    iget-object v0, p0, Lcom/instagram/f/b/c;->j:Lcom/instagram/f/b/h;

    if-eqz v0, :cond_0

    .line 440
    iget-object v0, p0, Lcom/instagram/f/b/c;->j:Lcom/instagram/f/b/h;

    invoke-interface {v0, p1}, Lcom/instagram/f/b/h;->a(Lch/boye/httpclientandroidlib/client/methods/HttpGet;)V

    .line 442
    :cond_0
    return-void
.end method

.method static synthetic a(Lcom/instagram/f/b/c;Lch/boye/httpclientandroidlib/client/methods/HttpGet;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 43
    invoke-direct {p0, p1}, Lcom/instagram/f/b/c;->a(Lch/boye/httpclientandroidlib/client/methods/HttpGet;)V

    return-void
.end method

.method static synthetic a(Lcom/instagram/f/b/c;Ljava/lang/String;Lcom/instagram/f/b/e;ZZZ)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 43
    invoke-direct/range {p0 .. p5}, Lcom/instagram/f/b/c;->a(Ljava/lang/String;Lcom/instagram/f/b/e;ZZZ)V

    return-void
.end method

.method private a(Ljava/lang/String;Lcom/instagram/f/b/e;ZZZ)V
    .locals 2
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 125
    if-eqz p5, :cond_0

    .line 129
    iget-object v0, p0, Lcom/instagram/f/b/c;->e:Lcom/instagram/f/b/b;

    invoke-virtual {v0, p1}, Lcom/instagram/f/b/b;->b(Ljava/lang/Object;)Ljava/lang/Object;

    .line 132
    :cond_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->e:Lcom/instagram/f/b/b;

    invoke-virtual {v0, p1}, Lcom/instagram/f/b/b;->a(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/f/b/a;

    .line 133
    if-nez v0, :cond_8

    .line 136
    iget-object v0, p0, Lcom/instagram/f/b/c;->f:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 137
    iget-object v0, p0, Lcom/instagram/f/b/c;->f:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/f/b/g;

    .line 138
    if-eqz p2, :cond_1

    .line 139
    invoke-virtual {v0, p2}, Lcom/instagram/f/b/g;->a(Lcom/instagram/f/b/e;)V

    .line 140
    if-eqz p3, :cond_1

    .line 141
    invoke-virtual {v0, p3}, Lcom/instagram/f/b/g;->b(Z)V

    .line 145
    :cond_1
    iget-object v1, p0, Lcom/instagram/f/b/c;->g:Ljava/util/HashSet;

    invoke-virtual {v1, v0}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_3

    .line 146
    iget-object v1, p0, Lcom/instagram/f/b/c;->h:Ljava/util/LinkedList;

    invoke-virtual {v1, v0}, Ljava/util/LinkedList;->remove(Ljava/lang/Object;)Z

    .line 147
    if-eqz p5, :cond_2

    .line 148
    invoke-virtual {v0}, Lcom/instagram/f/b/g;->d()V

    .line 150
    :cond_2
    invoke-direct {p0, p4, v0}, Lcom/instagram/f/b/c;->a(ZLcom/instagram/f/b/g;)V

    .line 164
    :cond_3
    :goto_0
    invoke-virtual {p0}, Lcom/instagram/f/b/c;->c()V

    .line 174
    :cond_4
    :goto_1
    return-void

    .line 154
    :cond_5
    new-instance v0, Lcom/instagram/f/b/g;

    const/4 v1, 0x0

    invoke-direct {v0, p0, p1, p3, v1}, Lcom/instagram/f/b/g;-><init>(Lcom/instagram/f/b/c;Ljava/lang/String;ZLcom/instagram/f/b/d;)V

    .line 155
    if-eqz p5, :cond_6

    .line 156
    invoke-virtual {v0}, Lcom/instagram/f/b/g;->d()V

    .line 158
    :cond_6
    if-eqz p2, :cond_7

    .line 159
    invoke-virtual {v0, p2}, Lcom/instagram/f/b/g;->a(Lcom/instagram/f/b/e;)V

    .line 161
    :cond_7
    iget-object v1, p0, Lcom/instagram/f/b/c;->f:Ljava/util/HashMap;

    invoke-virtual {v1, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 162
    invoke-direct {p0, p4, v0}, Lcom/instagram/f/b/c;->a(ZLcom/instagram/f/b/g;)V

    goto :goto_0

    .line 166
    :cond_8
    if-eqz p2, :cond_4

    .line 167
    invoke-virtual {v0}, Lcom/instagram/f/b/a;->a()Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-interface {p2, p1, v0}, Lcom/instagram/f/b/e;->a(Ljava/lang/String;Landroid/graphics/Bitmap;)V

    goto :goto_1
.end method

.method private a(ZLcom/instagram/f/b/g;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 177
    if-eqz p1, :cond_0

    .line 178
    iget-object v0, p0, Lcom/instagram/f/b/c;->h:Ljava/util/LinkedList;

    invoke-virtual {v0, p2}, Ljava/util/LinkedList;->addFirst(Ljava/lang/Object;)V

    .line 182
    :goto_0
    return-void

    .line 180
    :cond_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->h:Ljava/util/LinkedList;

    invoke-virtual {v0, p2}, Ljava/util/LinkedList;->addLast(Ljava/lang/Object;)V

    goto :goto_0
.end method

.method static synthetic b(Lcom/instagram/f/b/c;)Lcom/instagram/f/b/b;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/instagram/f/b/c;->e:Lcom/instagram/f/b/b;

    return-object v0
.end method

.method static synthetic c(Lcom/instagram/f/b/c;)Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;
    .locals 1
    .parameter

    .prologue
    .line 43
    invoke-direct {p0}, Lcom/instagram/f/b/c;->d()Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;

    move-result-object v0

    return-object v0
.end method

.method private d()Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;
    .locals 1

    .prologue
    .line 445
    iget-object v0, p0, Lcom/instagram/f/b/c;->c:Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;

    if-nez v0, :cond_0

    .line 446
    invoke-direct {p0}, Lcom/instagram/f/b/c;->e()V

    .line 448
    :cond_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->c:Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;

    return-object v0
.end method

.method static synthetic d(Lcom/instagram/f/b/c;)Ljava/util/HashMap;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/instagram/f/b/c;->f:Ljava/util/HashMap;

    return-object v0
.end method

.method static synthetic e(Lcom/instagram/f/b/c;)Ljava/util/HashSet;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/instagram/f/b/c;->g:Ljava/util/HashSet;

    return-object v0
.end method

.method private declared-synchronized e()V
    .locals 3

    .prologue
    .line 452
    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->c:Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 464
    :goto_0
    monitor-exit p0

    return-void

    .line 454
    :cond_0
    :try_start_1
    new-instance v0, Lch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager;

    invoke-direct {v0}, Lch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager;-><init>()V

    .line 455
    const/16 v1, 0xa

    invoke-virtual {v0, v1}, Lch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager;->setDefaultMaxPerRoute(I)V

    .line 456
    const/16 v1, 0xa

    invoke-virtual {v0, v1}, Lch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager;->setMaxTotal(I)V

    .line 458
    new-instance v1, Lch/boye/httpclientandroidlib/params/BasicHttpParams;

    invoke-direct {v1}, Lch/boye/httpclientandroidlib/params/BasicHttpParams;-><init>()V

    .line 459
    const/4 v2, 0x1

    invoke-static {v1, v2}, Lch/boye/httpclientandroidlib/params/HttpConnectionParams;->setTcpNoDelay(Lch/boye/httpclientandroidlib/params/HttpParams;Z)V

    .line 460
    const/16 v2, 0x2710

    invoke-static {v1, v2}, Lch/boye/httpclientandroidlib/params/HttpConnectionParams;->setConnectionTimeout(Lch/boye/httpclientandroidlib/params/HttpParams;I)V

    .line 461
    const/16 v2, 0x2710

    invoke-static {v1, v2}, Lch/boye/httpclientandroidlib/params/HttpConnectionParams;->setSoTimeout(Lch/boye/httpclientandroidlib/params/HttpParams;I)V

    .line 463
    new-instance v2, Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;

    invoke-direct {v2, v0, v1}, Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;-><init>(Lch/boye/httpclientandroidlib/conn/ClientConnectionManager;Lch/boye/httpclientandroidlib/params/HttpParams;)V

    iput-object v2, p0, Lcom/instagram/f/b/c;->c:Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 452
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method private f()Lcom/instagram/f/a/a;
    .locals 1

    .prologue
    .line 467
    iget-object v0, p0, Lcom/instagram/f/b/c;->i:Lcom/instagram/f/a/a;

    if-nez v0, :cond_0

    .line 468
    invoke-direct {p0}, Lcom/instagram/f/b/c;->g()V

    .line 470
    :cond_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->i:Lcom/instagram/f/a/a;

    return-object v0
.end method

.method private declared-synchronized g()V
    .locals 5

    .prologue
    .line 474
    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->i:Lcom/instagram/f/a/a;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 478
    :goto_0
    monitor-exit p0

    return-void

    .line 475
    :cond_0
    :try_start_1
    new-instance v0, Lcom/instagram/f/a/a;

    iget-object v1, p0, Lcom/instagram/f/b/c;->d:Landroid/content/Context;

    new-instance v2, Lch/boye/httpclientandroidlib/impl/client/cache/DefaultHttpCacheEntrySerializer;

    invoke-direct {v2}, Lch/boye/httpclientandroidlib/impl/client/cache/DefaultHttpCacheEntrySerializer;-><init>()V

    const/4 v3, 0x0

    const/high16 v4, 0x1e0

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/instagram/f/a/a;-><init>(Landroid/content/Context;Lch/boye/httpclientandroidlib/client/cache/HttpCacheEntrySerializer;Ljava/lang/String;I)V

    iput-object v0, p0, Lcom/instagram/f/b/c;->i:Lcom/instagram/f/a/a;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 474
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method


# virtual methods
.method public a(Lcom/instagram/f/b/h;)V
    .locals 0
    .parameter

    .prologue
    .line 435
    iput-object p1, p0, Lcom/instagram/f/b/c;->j:Lcom/instagram/f/b/h;

    .line 436
    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 2
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 88
    iget-object v0, p0, Lcom/instagram/f/b/c;->e:Lcom/instagram/f/b/b;

    invoke-virtual {v0, p1}, Lcom/instagram/f/b/b;->a(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/f/b/a;

    .line 89
    if-eqz v0, :cond_0

    .line 90
    invoke-virtual {v0}, Lcom/instagram/f/b/a;->a()Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v0, v1, v1}, Landroid/graphics/Bitmap;->getPixel(II)I

    .line 92
    :cond_0
    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 7
    .parameter

    .prologue
    const/4 v3, 0x0

    .line 101
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :goto_0
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    .line 102
    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    move-object v0, p0

    move v4, v3

    move v5, v3

    invoke-direct/range {v0 .. v5}, Lcom/instagram/f/b/c;->a(Ljava/lang/String;Lcom/instagram/f/b/e;ZZZ)V

    goto :goto_0

    .line 104
    :cond_0
    return-void
.end method

.method public a([Ljava/lang/String;)V
    .locals 8
    .parameter

    .prologue
    const/4 v3, 0x0

    .line 95
    array-length v7, p1

    move v6, v3

    :goto_0
    if-ge v6, v7, :cond_0

    aget-object v1, p1, v6

    .line 96
    const/4 v2, 0x0

    move-object v0, p0

    move v4, v3

    move v5, v3

    invoke-direct/range {v0 .. v5}, Lcom/instagram/f/b/c;->a(Ljava/lang/String;Lcom/instagram/f/b/e;ZZZ)V

    .line 95
    add-int/lit8 v0, v6, 0x1

    move v6, v0

    goto :goto_0

    .line 98
    :cond_0
    return-void
.end method

.method public b()J
    .locals 2

    .prologue
    .line 84
    invoke-direct {p0}, Lcom/instagram/f/b/c;->f()Lcom/instagram/f/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/f/a/a;->a()J

    move-result-wide v0

    return-wide v0
.end method

.method public c()V
    .locals 3

    .prologue
    .line 186
    :goto_0
    iget-object v0, p0, Lcom/instagram/f/b/c;->g:Ljava/util/HashSet;

    invoke-virtual {v0}, Ljava/util/HashSet;->size()I

    move-result v0

    const/4 v1, 0x4

    if-ge v0, v1, :cond_0

    iget-object v0, p0, Lcom/instagram/f/b/c;->h:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    .line 187
    iget-object v0, p0, Lcom/instagram/f/b/c;->h:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->removeFirst()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/f/b/g;

    .line 188
    iget-object v1, p0, Lcom/instagram/f/b/c;->g:Ljava/util/HashSet;

    invoke-virtual {v1, v0}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 189
    invoke-static {}, Lcom/instagram/n/c/a;->a()Ljava/util/concurrent/Executor;

    move-result-object v1

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Void;

    invoke-virtual {v0, v1, v2}, Lcom/instagram/f/b/g;->a(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lcom/instagram/d/a;

    goto :goto_0

    .line 191
    :cond_0
    return-void
.end method
